#pragma once

#include "fxcc/core/BaseLoader.h"
#include "fxcc/core/graph/common/Maps.h"

struct TextureLoader :public BaseLoader
{
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::Texture2DJack>> m_Texture2Ds;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::Texture3DJack>> m_Texture3Ds;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::TextureCubeJack>> m_TextureCubes;
	
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::Texture2DArrayJack>> m_Texture2DArrays;
	
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::TextureCubeArrayJack>> m_TextureCubeArrays;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::TextureCubeJack>> m_IrradianceMaps;
	
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::TextureCubeJack>> m_PrefilterMapss;
	
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::Texture2DJack>> m_BrdfTextureMaps;

	bool LoadFile(const fxcc::File& file);
	
	bool LoadDDSFile(const fxcc::File& file);

	std::shared_ptr<fxcc::graph::common::Texture2DJack> LoadDDS2DFile(const std::string& path);

	std::shared_ptr<fxcc::graph::common::Texture2DJack> Load2DFile(const std::string& path);

	std::shared_ptr<fxcc::graph::common::TextureCubeJack> LoadPrefilterMap(const std::string& path);

	std::shared_ptr<fxcc::graph::common::TextureCubeJack> LoadIrradianceMap(const std::string& path);
	
	std::shared_ptr<fxcc::graph::common::Texture2DJack> LoadBrdfMap(const std::string& path);

	std::shared_ptr<fxcc::graph::common::Texture2DArrayJack> LoadDDS2DArrayFile(const std::string& path);

	std::shared_ptr<fxcc::graph::common::TextureCubeJack> LoadDDSCubeFile(const std::string& path);
	
	std::shared_ptr<fxcc::graph::common::TextureCubeArrayJack> LoadDDSCubeArrayFile(const std::string& path);

	std::shared_ptr<fxcc::graph::common::Texture3DJack> LoadDDS3DFile(const std::string& path);

};